<?php
session_start( );
?>
<?php
require_once('connections/mysqlDB.php');
?>
<?php 

$dbConn = new mysqli(HOST,USER,PWD,DB);
// get login user regid
$regid=  $_SESSION['regid'];
//echo "regid: " . $regid;

/* prepare statement */
$dbConn->query("SET NAMES 'utf8'");
if ($stmt = $dbConn->prepare("select cname, concat(trim(first_name), ' ' , trim(last_name)) as fullname, trim(address1) as address1, address2, concat(trim(city),' ', trim(state), ' ' , trim(zip)) as address3, country, home_phone from registrant where regid= ?  ")) {
    $stmt->bind_param('s', $regid);
    $stmt->execute(); 
    $stmt->bind_result($col1, $col2, $col3, $col4, $col5, $col6, $col7);
    while ($stmt->fetch()) {
    //echo "<a href=\"con_registration.php?regid=" . $col1 . "\">" . $col1 . "</a></td>"; 
    if ($col1 == "") {
        $_SESSION['fullname'] = $col2;
    } else {
        $_SESSION['fullname'] = $col1;
    }
    //echo $_SESSION['fullname'];
    // echo $col3 . "<br>";
    // echo $col5 . "<br>";
    // echo $col6 . "<br>";
    // echo "Tel: " .  $col7 . "<br>";
    }
    //echo "</table>";
}
?>
